package com.blb.productservice.controller;

import com.blb.common.entity.Product;
import com.blb.common.util.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;

@Slf4j
public class HelloControllerFallback {

    public static String helloFallback(){
        return "Hello 我被降级了：（";
    }

    public static ResponseResult<Product> getProductByIdFallback(@PathVariable Long id){
        Product data = new Product();
        data.setName("降级处理");
        return ResponseResult.ok(data);
    }
}
